package com.arrogames.blondbattle.game.purchases 
{
	import ash.signals.Signal1;
	import com.arrogames.blondbattle.game.purchases.events.PurchaseEvent;
	import com.arrogames.blondbattle.game.graphics.ui.PurchaseButton;
	import starling.display.DisplayObject;
	/**
	 * ...
	 * @author Robin van den Bogaard
	 */
	public class Cooldown {
		
		private var _value:Number;
		
		public function Cooldown(value:Number) {
			_value = value;
		}
		
		public function advance(time:Number):void {
			_value -= time;
			if (_value < 0)
				_value = 0;
		}
		
		public function isOnCooldown():Boolean {
			return _value > 0;
		}
		
		public function get value():Number 
		{
			return _value;
		}
	}
}